package DB;

import java.util.HashSet;
import java.util.Set;


/* this Object represent a record in the FilesTable */

public class FilesTable 
{
	private String fileName;
	private String location; 
	private int fileID;
	private Set<TagsTable> tags;
	/**
	 * CTor
	 */
	public FilesTable()
	{
		tags = new HashSet<TagsTable>(1);
	}
	/**
	 * this function return the set of the tags that linked to this file
	 * @return {@link Set} of Tags that linked to the file
	 */
	public Set<TagsTable> getTags() 
	{
		return tags;
	}
	
	/**
	 * this function sets the {@link Set} of the tags that linked to this file
	 * @param tags Set of Tags that linked to the file
	 */
	public void setTags(Set<TagsTable> tags) 
	{
		this.tags = tags;
	}
	
	/**
	 * this function return the name of the file
	 * @return {@link String} the name of the file
	 */
	public String getFileName() 
	{
		return fileName;
	}
	
	/**
	 * this function sets the name of the file (this is the primary key)
	 * @param fileName {@link String} the name of the file
	 */
	public void setFileName(String fileName) 
	{
		this.fileName = fileName;
	}
	
	/**
	 * this function return the location of the file
	 * @return {@link String} with the location of the file
	 */
	public String getLocation() 
	{
		return location;
	}
	
	/**
	 * this function sets the location of the file
	 * @param location {@link String} with the location of the file
	 */
	public void setLocation(String location) 
	{
		this.location = location;
	}
	
	/**
	 * this function returns the ID of the file
	 * @return the ID of the file
	 */
	public int getFileID() 
	{
		return fileID;
	}
	
	/**
	 * this function sets the ID of the file
	 * @param fileID the ID of the file
	 */
	private void setFileID(int fileID) 
	{
		this.fileID = fileID;
	}

}
